package com.util;

import java.util.UUID;

import javax.servlet.http.HttpServletRequest;

import org.apache.log4j.Logger;
import org.apache.poi.ss.formula.functions.T;

public class Log4gUtil {
	public static Logger log = Logger.getLogger(T.class);
	
	public static Logger getLog(){
		return log;
	}
	
	public static void Info(String method,String userid,String explain,String expValue,String NF_callid,String token){
		String info = method + "-userid:" + userid +"-"+explain + ":" + expValue+" #NF_callid:"+NF_callid+" #NF_sessionid:"+token;
		log.info(info);
	}
	public static void main(String[] args) {
		Log4gUtil.Info("accountEnroll", "%%%", "新账号通过验证-账号", "%%%", "%%%", "%%%");
		Log4gUtil.Info("accountEnroll", "%%%", "已有账号未通过验证-账号", "%%%", "%%%", "%%%");
	}
	
	public static String getNFCallid(String callid){
		if(callid==null||callid.equals("")){
			callid=UUID.randomUUID().toString();
			
		}
		return callid;
	}
	
}
